#include "Model.h"

namespace devii
{

Model::Model()
{
}

Model::~Model()
{
}

void Model::setPosition(const float x, const float y, const float z)
{
	position.x = x;
	position.y = y;
	position.z = z;
}

void Model::setPosition(const float3& position)
{
	this->position = position;
}

void Model::setScale(const float x, const float y, const float z)
{
	scale.x = x;
	scale.y = y;
	scale.z = z;
}

void Model::setScale(const float3& position)
{
	this->scale = scale;
}

void Model::setRotationX(const float x)
{
	rotation.x = x;
}

void Model::setRotationY(const float y)
{
	rotation.y = y;
}

void Model::setRotationZ(const float z)
{
	rotation.z = z;
}

void Model::setRotation(const float x, const float y, const float z)
{
	rotation.x = x;
	rotation.y = y;
	rotation.z = z;
}

void Model::setRotation(const float3& rotation)
{
	this->rotation = rotation;
}


const float3 Model::getPosition() const
{
	return position;
}

const float3 Model::getScale() const
{
	return scale;
}

const float3 Model::getRotation() const
{
	return rotation;
}

const float Model::getRotationX() const
{
	return rotation.x;
}

const float Model::getRotationY() const
{
	return rotation.y;
}

const float Model::getRotationZ() const
{
	return rotation.z;
}

void Model::createWorld()
{
	matrix translate, rotation, scale;

	// TODO creation of matrices

	// Multiply them to one matrix
	world = translate * rotation * scale;
}

const matrix Model::getWorld() const
{
	return world;
}



}